﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing.geom {
    import flash.geom.*;

    public class IntPoint {

        public var x:int = 0;
        public var y:int = 0;

        public function IntPoint(_arg1:int=0, _arg2:int=0){
            this.x = _arg1;
            this.y = _arg2;
        }
        public static function creatWithPoint(_arg1:Point):IntPoint{
            return (new IntPoint(_arg1.x, _arg1.y));
        }

        public function toPoint():Point{
            return (new Point(this.x, this.y));
        }
        public function setWithPoint(_arg1:Point):void{
            this.x = _arg1.x;
            this.y = _arg1.y;
        }
        public function setLocation(_arg1:IntPoint):void{
            this.x = _arg1.x;
            this.y = _arg1.y;
        }
        public function setLocationXY(_arg1:int=0, _arg2:int=0):void{
            this.x = _arg1;
            this.y = _arg2;
        }
        public function move(_arg1:int, _arg2:int):IntPoint{
            this.x = (this.x + _arg1);
            this.y = (this.y + _arg2);
            return (this);
        }
        public function moveRadians(_arg1:int, _arg2:int):IntPoint{
            this.x = (this.x + Math.round((Math.cos(_arg1) * _arg2)));
            this.y = (this.y + Math.round((Math.sin(_arg1) * _arg2)));
            return (this);
        }
        public function nextPoint(_arg1:Number, _arg2:Number):IntPoint{
            return (new IntPoint((this.x + (Math.cos(_arg1) * _arg2)), (this.y + (Math.sin(_arg1) * _arg2))));
        }
        public function distanceSq(_arg1:IntPoint):int{
            var _local2:int = _arg1.x;
            var _local3:int = _arg1.y;
            return ((((this.x - _local2) * (this.x - _local2)) + ((this.y - _local3) * (this.y - _local3))));
        }
        public function distance(_arg1:IntPoint):int{
            return (Math.sqrt(this.distanceSq(_arg1)));
        }
        public function equals(_arg1:Object):Boolean{
            var _local2:IntPoint = (_arg1 as IntPoint);
            if (_local2 == null){
                return (false);
            };
            return ((((this.x === _local2.x)) && ((this.y === _local2.y))));
        }
        public function clone():IntPoint{
            return (new IntPoint(this.x, this.y));
        }
        public function toString():String{
            return ((((("IntPoint[" + this.x) + ",") + this.y) + "]"));
        }

    }
}//package org.aswing.geom 
